# source files
SRC = test01.cpp

OBJS = $(SRC:.cpp=.o)

# includes
INCLUDE_DIRS = D:\maile\workspace\02_Libs\glut-3.7.6\include 			#openGL
INCLUDE_DIRS += D:\maile\workspace\02_Libs\libfreenect\trunk\include	#libfreenect
INCLUDE_DIRS += D:\maile\workspace\02_Libs\openCV\trunk\include			#openCV

CXXFLAGS =	-O2 -g -Wall -fmessage-length=0
CPPFLAGS += $(foreach includedir,$(INCLUDE_DIRS),-I$(includedir))

#Libs
LIBS = glut32 glu32 opengl32											#openGL
LIB_DIRS = D:\maile\workspace\02_Libs\glut-3.7.6\lib					#openGL

LIBS += libfreenect														#libfreenect
LIB_DIRS += D:\maile\workspace\02_Libs\libfreenect\lib					#libfreenect

LIBS += libpthreadGC2													#pthread
LIB_DIRS += D:\maile\workspace\02_Libs\pthreads-w32-2.9.1\Pre-built.2\lib\x86

LIBS += opencv_core246d opencv_imgproc246d opencv_highgui246d			#openCV
LIB_DIRS += D:\maile\workspace\02_Libs\openCV\build\bin					#openCV

LIB = $(foreach lib,$(LIBS),-l$(lib))
LIB_DIR = $(foreach libdir,$(LIB_DIRS),-L$(libdir))

TARGET = test2.exe

$(TARGET):	$(OBJS)
	$(CXX) $(LIB_DIR) $(LIB) -o $(TARGET) $(OBJS) $(LIB)

all:	$(TARGET)

clean:
	rm -f $(OBJS) $(TARGET)
